<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>

<script type="text/javascript">
    var errorOpts = {
        msg : "<bean:message key="faq.read.msg" bundle="errors"/>",
        boxTitle : "<bean:message key="faq.read.boxTitle" bundle="errors"/>",
        msgStatus: "<bean:message key="faq.read.msgStatus" bundle="errors"/>"
    };
    var deleteOpts = {
            msg : "<bean:message key="faq.delete.msg" bundle="errors"/>",
            boxTitle : "<bean:message key="faq.delete.boxTitle" bundle="errors"/>",
            msgStatus: "<bean:message key="faq.delete.msgStatus" bundle="errors"/>"
    };
</script>

<c:forEach items="${requestScope.faqs}" var="entry">
<div class="result" id="result-${entry.faqID}">
	<ul class="itemResultNW">
   		<li>
     		<p class="faqDate">${entry.faqDate}</p>
        </li>
        <li>
     		<p class="faqCat" title="${entry.category.description}">${entry.category.name}</p>
        </li>
    	<li>
     		<p class="faqTitle"><a href="javascript:showReadingBox('${pageContext.request.contextPath}/operator/loadfaq.do',${entry.faqID},'<bean:message key="faq.boxtitle" bundle="faq"/>')">${entry.title}</a></p>
        </li>
    	<li>
	     	<div class="faqContent">${entry.content}</div>
        </li>
        <li class="panelOperatorFaq" id="panelOperatorFaq-${entry.faqID}">
        	<p class="OperatorFaqDelete">
			 <a class="aOperatorFaqDelete" href="javascript:deletefaq(${entry.faqID},'${pageContext.request.contextPath}/operator/deletefaq.do');">
			     <img class="imgPanelOperatorFaq" src="<c:url value="/layout/images/form/Delete.png"/>" alt="Delete" title="Delete" />
			 </a>
			</p>
			<p class="OperatorFaqEdit"><a class="aOperatorFaqEdit" href="${pageContext.request.contextPath}/operator/activeeditfaq.do?faqID=${entry.faqID}"><img class="imgPanelOperatorFaq" src="<c:url value="/layout/images/form/Edit2.png"/>" alt="Edit" title="Edit" /></a></p>
		</li>				            
	</ul>
</div>
</c:forEach>